package com.jxc.action.xtpz;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;

import com.jxc.action.BaseAction;
import com.jxc.model.vo.VOperationLog;
import com.jxc.service.OperationLogServiceI;
import com.opensymphony.xwork2.ModelDriven;

@Namespace("/xtpz")
@Action(value = "operationLogAction", results = { @Result(name = "operationLog", location = "/operationLog/operationLog.jsp") })
public class OperationLogAction extends BaseAction implements
		ModelDriven<VOperationLog> {

	@Autowired
	private OperationLogServiceI operationLogService;

	private VOperationLog model = new VOperationLog();

	@Override
	public VOperationLog getModel() {
		return model;
	}

	public String operationLog() {
		getSubAuths("XTPZ_CZRZ");
		return "operationLog";
	}

	public void datagrid() {
		writeJson(operationLogService.datagrid(model));
	}
}
